import org.eclipse.swt.events.PaintEvent;

//abstract Robot class which all types of decorator pattern robots extend
public abstract class AbstractRobotDecorator implements Robot{
	
	Robot robot;
	//c'tor
	AbstractRobotDecorator(Robot robot){
		this.robot = robot;
	}
	
	//sets robot's starting position
	public void setStartingPosition(Position p){ robot.setStartingPosition(p);}
	//sets robot's current position
	public void setCurrentPosition(Position p) { robot.setCurrentPosition(p);}
	// sets speed and heading to 0
	public void stop() { robot.stop();}
	// returns robots current position
	public Position getCurrentPosition() {return robot.getCurrentPosition();}
	//returns distance from starting point to current point
	public long getDistance() { return robot.getDistance();}
	//returns robots name
	public String getName() { return robot.getName(); }
	//return robot's fileName
	public String getFileName() { return robot.getFileName();}
	public void setFileName(String fileName) {robot.setFileName(fileName);}
	//compare to another robot - according to name
	public int compareTo(Robot r) { return robot.compareTo(r); }
	//return state of robot's hasFile
	public boolean hasFile() { return robot.hasFile(); }
	//sets robot hasFile state
	public void setHasFile(boolean bool)  { robot.setHasFile(bool); }
	//returns robots speed limit
	public int getSpeedLimit() { return robot.getSpeedLimit(); }
	//returns robots heading limit
	public int getHeadingLimit() { return robot.getHeadingLimit(); }
	//returns robots direction in which it's heading
	public int getHeading() { return robot.getHeading(); }
	//returns robots speed 
	public int getSpeed() { return robot.getSpeed(); }
	//set robots speed
	public void setSpeed(int speed) { robot.setSpeed(speed); }
	//set robots heading
	public void setHeading(int heading) { robot.setHeading(heading); }
	//returns true if picked up box and false if didn't
	public abstract boolean pickupBox(Box box);
	//returns true if put down box and false if didn't
	public abstract boolean putdownBox();
	// sets speed and heading parameters of robot so it can move accordingly
	public abstract void move(int speed,int heading);
	// moves robot to the right place according to speed and heading
	public abstract void act();
	//get robot's type
	public String getType(){return robot.getType();}
	//paints robot to canvas
	public abstract void paint(PaintEvent e);
}
